package springair.business.delegates.xml 
{
	import springair.domain.swc.RSLSWC;
	import springair.xml.RSLDigestParser;

	/**
	 * @author a.fell
	 */
	public class RSLParseDelegate 
	{
		public var xmlParser : RSLDigestParser;

		public function parseRSLDigestToSWCObject( source  : String ) : RSLSWC
		{
			var xml : XML = _cleanString( source );
			
			return xmlParser.parseXML(xml);
		}
		
		protected function _cleanString( input  :String ) : XML
		{
			var cleaned  :String = input.replace(/\ xmlns=\"([\w\d\:\/\.]+)\"/gi, '');	
		
			return new XML(cleaned);	
		}
		
	}
}
